# -*- coding: utf-8 -*- 

import  xdrlib ,sys
import xlrd

#import chardet  
data = xlrd.open_workbook("1.xls")  
table = data.sheets()[0]  
nrows = table.nrows  
# for i in range(nrows):  
# #print chardet.detect(str(table.row_values(i)))  
#         # print table.row_values(i)
#         # print str(table.row_values(4)).decode("unicode_escape").encode("utf8")  

# a = str(table.row_values(3)).decode("unicode_escape").encode("utf8")

def coordinate(L1,H1,L2,H2):  # - 斐波那契


    L1 = L1-1   #列1-2列
    H1 = H1-1  #行1-17行
    L2 = L2  #列2
    H2 = H2  #行2
    for h in range (H1,H2):
        for l in range(L1,L2):
            zhi = table.cell(h,l).value
            if len(zhi)!=0:
                print (zhi+" |",end=" ")
        a = table.cell(h+1,L1).value
        if len(a)!=0:
            print ("")
    return


Z = coordinate(2,17,9,38)
print("知识项")
print(Z)

J = coordinate(10,17,17,38)

print(J)
print("上面是")
print("技能项")
N = coordinate(18,17,35,38)
print(N)
print("上面是")
print("能力项")













# b = table.row_values(38)
# print (table.cell(1,3).value)
# print ("fsdaf")
# print (b)
# print (len(b[1]))
# for x in range(25):
#     if len(b[x])!=0:
#     	c=b[x]
        # print (c)
# if u"" == u"䶮":
#     print "zhegnque"
# else:
#     print ""
